home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
tools
/
rushdemo2
/
rexx
/
tolower.rush
< prev
Wrap
Text File
|
1995-03-09
|
782b
|
44 lines
/*
** $VER: tolower.rush 37.1 (2.12.93)
**
** Rename selected file to lowercase.
**
** Written by Douglas Keller
*/
if( address() == "REXX" ) then address "RUSH.1"
options results
/*
** Get directory name on active side, RC = 1 for device list
*/
'getdirectory'
dir = result
if( RC == 0 ) then do
if( right(dir, 1) ~= ":" ) then dir = dir || "/"
'getselected'
file = result
do while ( file ~= "" )
lower = translate(file, "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
if( file ~= lower ) then do
'statusmsg "Renaming ' || file || ' to ' || lower '"'
address command 'rename quiet from ' || dir || file || ' to ' || dir || lower
end
'getselected'
file = result
end
/* re-read dir beause names have changed */
'setdirectory' dir
end